﻿<div style="display:none;">
    <style>
        #print_FLYINGExpress_Template th {
            text-align: center;
        }

        #print_FLYINGExpress_Template th, td {
            padding: 2px;
        }

        #print_FLYINGExpress_Template td.title {
            width: 100px;
            text-align: center;
        }

        #print_FLYINGExpress_Template .barcode {
            margin: 0 auto;
        }
    </style>
    <div id="print_FLYINGExpress_Template" ng-repeat="data in dataList">
        <div style="height: 5%"><img src="assets/img/kingadmin-logo.png" /></div>
        <table cellpadding="2" cellspacing="0" border="1" width="100%" height="{{data.orderItems.length > 2 ? '95%':'45%'}}">
            <tr>
                <th colspan="6">客户信息</th>
            </tr>
            <tr>
                <td class="title">客户编号</td>
                <td colspan="4">{{data.customerNumber}}</td>
                <td><div class="barcode" trackingNumber="{{data.referenceOrderNumber}}"></div></td>
            </tr>
            <tr>
                <td class="title">收货地址</td>
                <td colspan="5">
                    {{data.address.receivePersonName}}<span ng-show="!!data.address.cellphoneNumber">({{data.address.cellphoneNumber}})</span>{{data.address.address1}}{{data.address.receiveCompanyName}}<span ng-show="!!data.address.zipcode">({{data.address.zipcode}})</span>
                </td>
            </tr>
            <tr>
                <th colspan="6">订单内容</th>
            </tr>
            <tr>
                <td class="title">申报品名</td>
                <td colspan="5">
                    <table cellpadding="5" cellspacing="0" border="1" width="100%">
                        <tr>
                            <th>序号</th>
                            <th>品牌</th>
                            <th>商品描述</th>
                            <th>数量</th>
                            <th>价值($)</th>
                        </tr>
                        <tr ng-repeat="item in data.orderItems">
                            <td>{{$index + 1}}</td>
                            <td>{{item.itemBrand}}</td>
                            <td style="max-width: 300px;">
                                <div style="display:block; overflow:hidden; text-overflow:ellipsis; max-height:44px;">
                                    {{item.description}}
                                    {{ !!item.property1 ? " " + item.property1 : "" }}
                                    {{ !!item.property2 ? " " + item.property2 : "" }}
                                    {{ !!item.property3 ? " " + item.property3 : "" }}
                                    {{ !!item.property4 ? " " + item.property4 : "" }}
                                    {{ !!item.property5 ? " " + item.property5 : "" }}
                                </div>
                            </td>
                            <td>{{item.quantity}}</td>
                            <td>{{item.unitprice | number:2}}</td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td class="title">包裹信息</td>
                <td colspan="5">
                    <table cellpadding="5" cellspacing="0" border="1" width="100%">
                        <tr>
                            <th>跟踪号</th>
                            <th>实际重量(磅)</th>
                            <th>发货地</th>
                        </tr>
                        <tr>
                            <td><div class="barcode" trackingNumber="{{data.trackingNumber}}"></div></td>
                            <td>{{data.actualWeight || 0}}</td>
                            <td style="text-align:center;">{{data.warehouseName}}</td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td class="title">打包人员</td>
                <td colspan="3">{{data.inuserName}}</td>
                <td class="title">生成日期</td>
                <td>{{data.indate | date:'MM/dd/yyyy HH:mm:ss'}}</td>
            </tr>
        </table>
        <hr style="margin:2.5% auto; width:100%; color: #666;" ng-if="data.orderItems.length <= 2" />
        <table cellpadding="2" cellspacing="0" border="1" width="100%" height="45%" style="margin-top:2%;">
            <tr>
                <th style="height: 25%; border-right: 0px none;">
                    <div style="text-align:center; float:left;">
                        <div><img src="assets/img/FlyingExpress.jpg" /></div>
                        <div><label style="font-size:12px; font-weight: 100;">Tel:0532-83867106</label></div>
                        <div><label style="font-size:12px; font-weight: 100;">Tel:0532-83867156</label></div>
                    </div>
                </th>
                <th style="height: 25%; border-left: 0px none;">
                    <label><div class="barcode" trackingNumber="{{data.xtTrackingNumber}}"></div></label><br />
                </th>
            </tr>
            <tr>
                <td height="30%" style="">
                    <label style="width:100%;height:80%;">Shipper:&nbsp;{{data.xtShipInfo.shipfrom}}</label>
                    <label style="width:45%;height:20%;">Tel:</label>
                    <label style="width:50%;height:20%; text-align:right;">PP</label>
                </td>
                <td height="30%">
                    <label style="width:100%;height:80%;">Consignee:&nbsp;{{data.xtShipInfo.shipto}}</label>
                    <label style="width:45%;height:20%;">Tel:</label>
                    <label style="width:50%;height:20%; text-align:right;">CC</label>
                </td>
            </tr>
            <tr>
                <td colspan="2" height="30%" style="font-size:12px; font-weight: 100;">
                    <label style=" width: 49%; height: 24%; padding-top: 1%; padding-bottom: 1%;">Description:</label>
                    <label style=" width: 48%; height: 24%; padding-top: 1%; padding-bottom: 1%;">
                        <span style="margin-right:5px;" ng-repeat="xtProductType in data._xtProductTypeTotal">*{{xtProductType.type}}*{{xtProductType.total}}</span>
                    </label>
                    <label style="width: 100%; height: 54%; padding-top: 1%;">PCS:</label>
                    <label style="width: 24%; height: 18%;">Shipper:</label>
                    <label style="width: 24%; height: 18%;">Pick up:</label>
                    <label style="width: 24%; height: 18%;">Deliver:</label>
                    <label style="width: 24%; height: 18%;">Consignee:</label>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="font-size:12px; font-weight: 100; width: 100%;">
                    <label style="float:left;">Remarks:</label>
                    <div style="clear:both;"></div>
                    <div class="barcode" style="float:left;" trackingNumber="{{data.referenceOrderNumber}}"></div>
                    <div style="float:right;">
                        <div class="barcode" trackingNumber="{{data.trackingNumber}}"></div>
                    </div>
                </td>
            </tr>
        </table>
        <div style="height:55%" ng-if="data.orderItems.length > 2"></div>
    </div>
</div>
